<?php
header("Content-Type: text/xml; charset=UTF-8");
require "connection/connection_database.php";
require "app/base/base-url.php";
?>
<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"; ?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">
    <channel>
        <title>Bravolaw</title>
        <link>http://<?= $_SERVER['HTTP_HOST'] . $url["home"] ?></link>
        <description>Kiến tạo thành công</description>
        <language>en-us</language>
        <copyright>Copyright (C) 2013 http://<?php echo $_SERVER['HTTP_HOST'] . $url["home"] ?></copyright>
        <?php
        $query = "SELECT * FROM cate_board_page ORDER BY page_date DESC";
        $result = mysql_query($query) or die("Could not execute query");

        while ($row = mysql_fetch_array($result)) {
            extract($row);
        ?> 
            <item>
                <title><?php echo $page_title ?></title>
                <description><?php echo $page_summary ?></description>
                <link>http://<?php echo $_SERVER['HTTP_HOST'] . $url["home"] . "/" . $page_link ?></link>
                <pubDate><?php echo date("D, d M Y H:i:s O", strtotime($page_date)) ?></pubDate>
            </item>
        <?php } ?>
    </channel>
</rss>